package com.context.UserCommands;

import com.mInterface.UserCommands.CommandInterface;

public class UserCommandsContext {

	private static CommandInterface CI = null;

	public static final String  TYPE_UPLOAD_DATAS = "com.impl.UserCommands.UploadDatasImpl";
	
	public static final String  TYPE_GET_DATAS = "com.impl.UserCommands.GetDataImpl";
	
	public static final String  TYPE_ADD_NEW_ACCOUNT = "com.impl.UserCommands.UserAddNewAccountImpl";
	
	public static CommandInterface createInstance( String type ){

		CI = null;
		try {
			CI = (CommandInterface)Class.forName( type).newInstance();
		} catch (InstantiationException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IllegalAccessException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (ClassNotFoundException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return CI;
	}
}
